/**
 * Copyright 2004 - 2007 Blue Bamboo International Inc. 
 *           All rights reserved.
 *
 *
 * Blue Bamboo PROPRIETARY/CONFIDENTIAL.
 *
 */

package com.bluebamboo.bluetools.pingpang.bean;

import org.apache.mina.core.service.IoHandler;

import com.bluebamboo.bluetools.pingpang.connection.IConnectionHandler;
import com.bluebamboo.bluetools.pingpang.connection.SocketServerConnectionHandler;

/**
 * DOCME
 * 
 * @author tanxuqing
 * @date Sep 12, 2009
 * @since
 */
public class SocketServerBean extends ConnectionBean {

    private int port;

    /**
     * @param name
     * @param type
     */
    public SocketServerBean(String name, int type) {
        super(name, type);
    }

    /**
     * @param name
     * @param type
     * @param port
     */
    public SocketServerBean(String name, int type, int port) {
        super(name, type);
        this.port = port;
    }

    /**
     * @return the port
     */
    public int getPort() {
        return port;
    }

    /**
     * @param port the port to set
     */
    public void setPort(int port) {
        this.port = port;
    }

    @Override
    public IConnectionHandler createConnectionHandler() {
        return new SocketServerConnectionHandler(this);
    }

    @Override
    public IoHandler createIoHandler() {
        // TODO Auto-generated method stub
        return null;
    }

}
